<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/12/15/015
 * Time: 17:14
 */

namespace app\portal\controller;


use cmf\controller\AdminBaseController;
use think\Db;
use app\portal\model\LiuyanModel ;

class LiuyanController extends AdminBaseController
{
    /**
     * 留言管理
     */
    public function index()
    {
        $liuyanModel = new LiuyanModel();
        $list = $liuyanModel->order('id','desc')->paginate(10);
        $this->assign("tags", $list);
        $this->assign('page', $list->render());
        return $this->fetch();
    }

    /**
     * 获取说明数据
     */
    public function select()
    {
        $id = input('get.id');
        $liuyanModel = new LiuyanModel();
        $data = $liuyanModel->where('id','=',$id)->field('content')->find();
        $this->assign('content',$data['content']);
        return $this->fetch();
    }
}